home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / util / arc / xadmaster.lha / xad / Developer / Include / Autodocs / xadmaster.doc next >
Encoding:
Text File  |  2000-08-31  |  54.6 KB  |  1,428 lines

  1. TABLE OF CONTENTS
  2.  
  3. xadmaster.library/--general--
  4. xadmaster.library/xadAllocObject
  5. xadmaster.library/xadAllocVec
  6. xadmaster.library/xadCalcCRC16
  7. xadmaster.library/xadCalcCRC32
  8. xadmaster.library/xadConvertDates
  9. xadmaster.library/xadConvertProtection
  10. xadmaster.library/xadCopyMem
  11. xadmaster.library/xadDiskUnArc
  12. xadmaster.library/xadDiskFileUnArc
  13. xadmaster.library/xadFileUnArc
  14. xadmaster.library/xadFreeInfo
  15. xadmaster.library/xadFreeHookAccess
  16. xadmaster.library/xadFreeObject
  17. xadmaster.library/xadGetClientInfo
  18. xadmaster.library/xadGetDiskInfo
  19. xadmaster.library/xadGetErrorText
  20. xadmaster.library/xadGetInfo
  21. xadmaster.library/xadGetHookAccess
  22. xadmaster.library/xadHookAccess
  23. xadmaster.library/xadHookTagAccess
  24. xadmaster.library/xadRecogFile
  25. xadmaster.library/--tags--
  26. xadmaster.library/--data hooks--
  27. xadmaster.library/--progress hooks--
  28.  
  29. VERSION
  30.         $VER: xadmaster.doc 8.0 (20.08.2000) by SDI
  31.  
  32. xadmaster.library/--general--                   xadmaster.library/--general--
  33.  
  34.     This library gives you an interface to extract data from file or disk
  35.     archives.
  36.  
  37.     When unachiving a archive you need to do following steps always
  38.     1) Allocate a "struct xadArchiveInfo" with a call to
  39.        xadAllocObjectA(XADOBJ_ARCHIVEINFO, 0). This structure is the master
  40.        interface and must not by modified in any way. Nearly all other
  41.        functions you may use need to get the pointer this this structure.
  42.        All data is passed with tags!
  43.  
  44.     2a)Call xadGetInfo() to find out if the input data is archived. If it
  45.        is, the xadArchiveInfo structure is filled with lots of information
  46.        (but the structure may contain empty lists!).
  47.        See xadGetInfo() description to see what you may read and what stuff
  48.        not. One of the input tags must be specified here to specify one 
  49.        of the allowed input stream methods.
  50.  
  51.     2b)Call xadGetDiskInfo() to find out if input data is filesystem data.
  52.  
  53.     Goto step 5 if step 2 returns error code!
  54.  
  55.     3) For every file in a file archive or every disk call xadFileUnArc() or
  56.        xadDiskUnArc() (or xadDiskFileUnArc() if you did step 2b) with one tag
  57.        XAD_ENTRYNUMBER set to wanted entry. One of the output tags must be
  58.        specified here.
  59.        Passwords and other stuff is additionally allowed and sometimes
  60.        required.
  61.  
  62.     4) Call xadFreeInfo() to free the stuff allocated with xadGetInfo() or
  63.        xadGetDiskInfo().
  64.  
  65.     5) Use xadFreeObjectA() to free the xadArchiveInfo structure.
  66.  
  67.     If using xadGetDiskInfo(), there maybe multiple filesystems on one disk.
  68.     If one is detected, do another run and use XAD_STARTCLIENT in step 2b).
  69.     If you detected disk archives, it maybe useful to scan them for file-
  70.     systems as well.
  71.  
  72.     Do not use one xadArchiveInfo file structure for multiple input files!
  73.     
  74.     ANY needed structure must be allocated with xadAllocObject()! None of
  75.     the xadmaster structures can be allocated any other way!
  76.  
  77.     There exist lots of tags, which can be passed to the functions of this
  78.     library. Some of these are repeated in the xadArchiveInfo communication
  79.     structure. Do NEVER set this flags or values directly, but always use
  80.     the corresponding tags. The handling of these elements possibly will
  81.     change, but the tags will stay valid always!
  82.  
  83.     I know there are lots of flags which have long and strange names. The
  84.     method is not so complicated as you may think. They always follow following
  85.     guideline: XADxxY_zzzzz
  86.     xx - short name of their structure (AI - xadArchiveInfo, DI - xadDiskInfo,
  87.          C - xadClient, ...)
  88.     Y  - F for flag or B for bit value
  89.     zz - The flag name itself
  90.     So XADPIF_OVERWRITE is a flag for xadProgressInfo, which is called
  91.     OVERWRITE and XADAIB_OVERWRITE is a bit value for xadArchiveInfo structure.
  92.     
  93.     Also all the structure elements cover a short prefix indicating the name
  94.     of the master structure (xfi for xadFileInfo, xc for xadClient, ...). So
  95.     you can always check if your code is valid by comparing the prefixes.
  96.  
  97. xadmaster.library/xadAllocObject             xadmaster.library/xadAllocObject
  98.  
  99.     NAME
  100.         xadAllocObject - Allocate memory for all xad related structures
  101.  
  102.     SYNOPSIS
  103.         ptr = xadAllocObjectA(type, tags)
  104.         D0                    D0    A0
  105.  
  106.         APTR xadAllocObjectA(ULONG, struct TagItem *)
  107.  
  108.         ptr = xadAllocObject(type, tag1, ...)
  109.  
  110.         APTR xadAllocObject(ULONG, Tag, ...)
  111.  
  112.     FUNCTION
  113.         This function allocates the memory of a needed xad related
  114.         structure and initializes it. You need to use this function to
  115.         allocate the structures. Any other way of allocating is not
  116.         allowed.
  117.     The structures are initialized, which means filled with zero in
  118.     nearly all cases. Fields allocated with XAD_OBJxxx are filled with
  119.     corresponding pointers and are cleared also. It is NOT necessary
  120.     to leave these pointers intact when calling xadFreeObject().
  121.  
  122.     INPUT
  123.         type    - in libraries/xadmaster.h defined XADOBJ_... types.
  124.                   For example XADOBJ_FILEINFO allocates xadFileInfo
  125.                   structure.
  126.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  127.                   XAD_OBJNAMESIZE, XAD_OBJCOMMENTSIZE, XAD_OBJBLOCKENTRIES,
  128.                   XAD_OBJPRIVINFOSIZE
  129.  
  130.     RESULT
  131.         ptr     - Pointer to required structure or 0 when an error occured.
  132.  
  133.     SEE ALSO
  134.         libraries/xadmaster.h, xadFreeObject(), tags section
  135.  
  136. xadmaster.library/xadAllocVec                   xadmaster.library/xadAllocVec
  137.  
  138.     NAME
  139.         xadAllocVec - Allocate memory for xad related stuff (V2)
  140.  
  141.     SYNOPSIS
  142.         ptr = xadAllocVec(size, flags)
  143.         D0                 D0     D1
  144.  
  145.         APTR xadAllocVec(ULONG, ULONG)
  146.  
  147.     FUNCTION
  148.         This function allocates memory for stuff related to xad. It is like
  149.         exec.library AllocVec() function, but uses xadFreeObject() to free
  150.         stuff and reduces the need for SysBase in clients. It's the prefered
  151.         method to allocate memory in clients.
  152.  
  153.     INPUT
  154.         size    - The size in bytes.
  155.         flags   - Normal MEMF_... flags defined in exec/types.h
  156.  
  157.     RESULT
  158.         ptr     - Pointer to required memory or 0 when an error occured.
  159.  
  160.     SEE ALSO
  161.         libraries/xadmaster.h, exec/types.h, exec.doc/AllocMem(),
  162.         xadFreeObject(),
  163.  
  164. xadmaster.library/xadCalcCRC16                 xadmaster.library/xadCalcCRC16
  165.  
  166.     NAME
  167.         xadCalcCRC16 - calculate a 16 bit CRC
  168.  
  169.     SYNOPSIS
  170.         crc16 = xadCalcCRC16(id, init, size, buffer)
  171.         D0                   D0   D1    D2     A0
  172.  
  173.         UWORD xadCalcCRC16(UWORD, UWORD, ULONG, STRPTR)
  174.  
  175.     FUNCTION
  176.         This function calculates a 16 bit CRC. It is possible to choose the
  177.         calculation method by parameter id.
  178.  
  179.         The CRC calculation uses a table built with following function:
  180.         void MakeCRC16(UWORD *buf, ULONG ID)
  181.         {
  182.           UWORD i, j, k;
  183.  
  184.           for(i = 0; i < 256; ++i)
  185.           {
  186.             k = i;
  187.  
  188.             for(j = 0; j < 8; ++j)
  189.             {
  190.               if(k & 1)
  191.                 k = (k >> 1) ^ ID;
  192.               else
  193.                 k >>= 1;
  194.             }
  195.             buf[i] = k;
  196.           }
  197.         }
  198.  
  199.         The used calculation routine is like that:
  200.         crc = init;
  201.         while(size--)
  202.           crc = tab[(crc ^ *buffer++) & 0xFF] ^ (crc >> 8);
  203.  
  204.         ID's defined in xadmaster.h use a default table. All others build the
  205.         table on the fly.
  206.         XADCRC16_ID1: (0xA001) - Used by DMS, Arc, ...
  207.  
  208.     INPUT
  209.         id      - The table creation ID (maybe XADCR16_ID value)
  210.         init    - The initial value for CRC calculation.
  211.         size    - The input buffer size.
  212.         buffer  - A pointer to the input buffer.
  213.  
  214.     RESULT
  215.         crc16   - The calculated CRC value.
  216.  
  217.     SEE ALSO
  218.         libraries/xadmaster.h, xadCalcCRC32
  219.  
  220. xadmaster.library/xadCalcCRC32                 xadmaster.library/xadCalcCRC32
  221.  
  222.     NAME
  223.         xadCalcCRC32 - calculate a 32 bit CRC
  224.  
  225.     SYNOPSIS
  226.         crc32 = xadCalcCRC32(id, init, size, buffer)
  227.         D0                   D0   D1    D2     A0
  228.  
  229.         ULONG xadCalcCRC32(ULONG, ULONG, ULONG, STRPTR)
  230.  
  231.     FUNCTION
  232.         This function calculates a 32 bit CRC. It is possible to choose the
  233.         calculation method by parameter id.
  234.  
  235.         The CRC calculation uses a table built with following function:
  236.         void MakeCRC32(ULONG *buf, ULONG ID)
  237.         {
  238.           ULONG i, j, k;
  239.  
  240.           for(i = 0; i < 256; ++i)
  241.           {
  242.             k = i;
  243.  
  244.             for(j = 0; j < 8; ++j)
  245.             {
  246.               if(k & 1)
  247.                 k = (k >> 1) ^ ID;
  248.               else
  249.                 k >>= 1;
  250.             }
  251.             buf[i] = k;
  252.           }
  253.         }
  254.  
  255.         The used calculation routine is like that:
  256.         crc = init;
  257.         while(size--)
  258.           crc = tab[(crc ^ *buffer++) & 0xFF] ^ (crc >> 8);
  259.  
  260.         ID's defined in xadmaster.h use a default table. All others build the
  261.         table on the fly.
  262.         XADCRC32_ID2: (0xEDB88320) - Used by Zoom, Zip, LZX, ...
  263.  
  264.     INPUT
  265.         id      - The table creation ID (maybe XADCR32_ID value)
  266.         init    - The initial value for CRC calculation.
  267.         size    - The input buffer size.
  268.         buffer  - A pointer to the input buffer.
  269.  
  270.     RESULT
  271.         crc32   - The calculated CRC value.
  272.  
  273.     SEE ALSO
  274.         libraries/xadmaster.h, xadCalcCRC16
  275.  
  276. xadmaster.library/xadConvertDates           xadmaster.library/xadConvertDates
  277.  
  278.     NAME
  279.         xadConvertDates - convert between date storage methods
  280.  
  281.     SYNOPSIS
  282.         result = xadConvertDatesA(tags)
  283.         D0                         A0
  284.  
  285.         LONG xadConvertDatesA(struct TagItem *)
  286.  
  287.         result = xadConvertDates(tag1, ...)
  288.  
  289.         LONG xadConvertDates(Tag, ...)
  290.  
  291.     FUNCTION
  292.         This function can be used to transform date and time between
  293.         different storage systems. One of the input tags must be specified.
  294.         Output tags may be specified multiple. The date information is
  295.         based on Gregorian calendar. Some systems can store a wider range
  296.         of dates than others. If a date produces an overflow or an
  297.         underflow for a special date, the highest/lowest valid date is used
  298.         (e.g. for timevalues 0x00000000 or 0xFFFFFFFF).
  299.  
  300.         The XAD_MAKEGMTDATE and XAD_MAKELOCALDATE tags need locale.library
  301.         to get the offset to local time. If locale.library cannot be opened
  302.         the offset is set to 0.
  303.  
  304.         XAD_DATECURRENTTIME can be used to get the current system date and
  305.         time.
  306.  
  307.         WeekDay information is ignored for input and always recalculated.
  308.         The calculation routines use full range of available variable space,
  309.         so f.e. a Unix date 1.1.1970 00:00:00 (value 0x00000000) with a
  310.         UTC offset of -30 min produces 31.12.1968 23:30:00 (which cannot be
  311.         stored as UNIX time value, but only as xadDate structure)!.
  312.  
  313.     INPUT
  314.         ai      - the master communication structure
  315.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  316.                   XAD_DATEUNIX, XAD_DATEAMIGA, XAD_DATEMAC, XAD_DATEDATESTAMP,
  317.                   XAD_DATEXADDATE, XAD_DATECLOCKDATA, XAD_DATECURRENTTIME,
  318.                   XAD_DATEMSDOS, XAD_GETDATEUNIX, XAD_GETDATEAMIGA,
  319.                   XAD_GETDATEDATESTAMP, XAD_GETDATEXADDATE,
  320.                   XAD_GETDATECLOCKDATA, XAD_GETDATEMSDOS, XAD_GETDATEMAC,
  321.                   XAD_MAKEGMTDATE, XAD_MAKELOCALDATE
  322.  
  323.     RESULT
  324.         result  - any of the XADERR codes or zero when all is ok.
  325.  
  326.     SEE ALSO
  327.         libraries/xadmaster.h, tags section
  328.  
  329. xadmaster.library/xadConvertProtection xadmaster.library/xadConvertProtection
  330.  
  331.     NAME
  332.         xadConvertProtection - convert between different protection bits (V4)
  333.  
  334.     SYNOPSIS
  335.         result = xadConvertProtectionA(tags)
  336.         D0                              A0
  337.  
  338.         LONG xadConvertProtectionA(struct TagItem *)
  339.  
  340.         result = xadConvertProtection(tag1, ...)
  341.  
  342.         LONG xadConvertProtection(Tag, ...)
  343.  
  344.     FUNCTION
  345.         This function can be used to transform protection bits of different
  346.         operating systems.
  347.  
  348.     The protection values are initialised with the Amiga standard values
  349.     "rwed". These bits are modified by specified XAD_PROTxxx tags, but
  350.     only the bits supported by that format (e.g. most systems do not
  351.     support "s" or "p"). You may specify multiple XAD_PROTxxx tags, if
  352.     a program stores them in different formats. As Amiga supports all
  353.     bits, it is necessary to specify XAD_PROTAMIGA as first argument in
  354.     such cases.
  355.  
  356.     The taglist must contain at least one of the XAD_GETPROTxxx tags.
  357.     Currently only XAD_GETPROTAMIGA is supported.
  358.  
  359.     The stored result is not affected by the position of the
  360.     XAD_GETPROTxxx tag in the list of tags! The result are always the
  361.     bits, which are computed of all input tags.
  362.  
  363.     INPUT
  364.         ai      - the master communication structure
  365.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  366.                   XAD_PROTAMIGA, XAD_PROTUNIX, XAD_PROTMSDOS,
  367.                   XAD_GETPROTAMIGA
  368.     RESULT
  369.         result  - any of the XADERR codes or zero when all is ok.
  370.  
  371.     SEE ALSO
  372.         libraries/xadmaster.h, tags section
  373.  
  374. xadmaster.library/xadCopyMem                     xadmaster.library/xadCopyMem
  375.  
  376.     NAME
  377.         xadCopyMem - copies one data block to another position (V2)
  378.  
  379.     SYNOPSIS
  380.         xadCopyMem(src, dest, size)
  381.                     A0   A1    D0
  382.  
  383.         void xadCopyMem(APTR, APTR, ULONG)
  384.  
  385.     FUNCTION
  386.         xadCopyMem is a general purpose memory copy function. It can deal
  387.         any length and its pointers on any alignment. It tries to optimize
  388.         the copy operation, when alignment and size allow longword copies.
  389.  
  390.         Overlapping copies are supported in both directions.
  391.  
  392.         The internal implementation of this function will change from
  393.         system to system and version to version.
  394.         This copy function is not highly optimized, but should fit any needs
  395.         around xadmaster.library!
  396.  
  397.     INPUT
  398.         src     - the source buffer
  399.         dest    - the destination buffer
  400.         size    - the size to copy
  401.  
  402.     RESULT
  403.         none
  404.  
  405.     SEE ALSO
  406.         libraries/xadmaster.h, exec.library/CopyMem()
  407.  
  408. xadmaster.library/xadDiskUnArc                 xadmaster.library/xadDiskUnArc
  409.  
  410.     NAME
  411.         xadDiskUnArc - the master function for unarchiving disks
  412.  
  413.     SYNOPSIS
  414.         result = xadDiskUnArcA(ai, tags)
  415.         D0                    A0   A1
  416.  
  417.         LONG xadDiskUnArcA(struct xadArchiveInfo *, struct TagItem *)
  418.  
  419.         result = xadDiskUnArc(ai, tag1, ...)
  420.  
  421.         LONG xadDiskUnArc(struct xadArchiveInfo *, Tag, ...)
  422.  
  423.     FUNCTION
  424.         This function dearchives a disk archive. It can be called after
  425.         a successful call to xadGetInfo(). At least the tag XAD_ENTRYNUMBER
  426.         and one of the output tags needs to be supplied. When a progress
  427.         hook is supplied, this can be used for questioning for overwriting
  428.         and ignoring of drive geometry and for status displays.
  429.         Normally disk archivers will have only one entry, but there may
  430.         be multiple disk archives.
  431.  
  432.         When this function returns, the supplied output data streams may
  433.         be used in any way (files, memory). The library does not even know
  434.         that they exist! The xadmaster.library cannot be used to rename,
  435.         protect, comment or delete that stuff!
  436.  
  437.     INPUT
  438.         ai      - the master communication structure
  439.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  440.           XAD_ENTRYNUMBER, XAD_HIGHCYLINDER, XAD_LOWCYLINDER,
  441.           XAD_PASSWORD, output tags of xadGetHookAccess()
  442.  
  443.     RESULT
  444.         result  - any of the XADERR codes or zero when all is ok.
  445.  
  446.     SEE ALSO
  447.         libraries/xadmaster.h, xadFileUnArc(), xadGetInfo(),
  448.         xadGetHookAccess(), tags section
  449.  
  450. xadmaster.library/xadDiskFileUnArc         xadmaster.library/xadDiskFileUnArc
  451.  
  452.     NAME
  453.         xadDiskFileUnArc - for unarchiving files from disk image (V4)
  454.  
  455.     SYNOPSIS
  456.         result = xadDiskFileUnArcA(ai, tags)
  457.         D0                         A0   A1
  458.  
  459.         LONG xadDiskFileUnArcA(struct xadArchiveInfo *, struct TagItem *)
  460.  
  461.         result = xadDiskFileUnArc(ai, tag1, ...)
  462.  
  463.         LONG xadDiskFileUnArc(struct xadArchiveInfo *, Tag, ...)
  464.  
  465.     FUNCTION
  466.         This function extracts a file from disk images. It can be called
  467.         after a succesful call to xadGetDiskInfo(). At least the tag
  468.         XAD_ENTRYNUMBER and one of the output tags needs to be supplied.
  469.         When a progress hook is supplied, this can be used for questioning
  470.         for overwriting and for status displays.
  471.         This function needs to be called for every file, which should be
  472.         unarchived.
  473.  
  474.         When this function returns, the supplied output data streams may
  475.         be used in any way (files, memory). The library does not even know
  476.         that they exist! The xadmaster.library cannot be used to rename,
  477.         protect, comment or delete that stuff!
  478.  
  479.     INPUT
  480.         ai      - the master communication structure
  481.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  482.           XAD_ENTRYNUMBER, XAD_PASSWORD, output tags of
  483.           xadGetHookAccess()
  484.  
  485.     RESULT
  486.         result  - any of the XADERR codes or zero when all is ok.
  487.  
  488.     SEE ALSO
  489.         libraries/xadmaster.h, xadGetDiskInfo(), xadGetHookAccess(),
  490.         tags section
  491.  
  492. xadmaster.library/xadFileUnArc                 xadmaster.library/xadFileUnArc
  493.  
  494.     NAME
  495.         xadFileUnArc - the master function for unarchiving disks
  496.  
  497.     SYNOPSIS
  498.         result = xadFileUnArcA(ai, tags)
  499.         D0                    A0   A1
  500.  
  501.         LONG xadFileUnArcA(struct xadArchiveInfo *, struct TagItem *)
  502.  
  503.         result = xadFileUnArc(ai, tag1, ...)
  504.  
  505.         LONG xadFileUnArc(struct xadArchiveInfo *, Tag, ...)
  506.  
  507.     FUNCTION
  508.         This function dearchives a file archive entry. It can be called
  509.         after a succesful call to xadGetInfo(). At least the tag
  510.         XAD_ENTRYNUMBER and one of the output tags needs to be supplied.
  511.         When a progress hook is supplied, this can be used for questioning
  512.         for overwriting and for status displays.
  513.         This function needs to be called for every file, which should be
  514.         unarchived. Best is to do unarchiving in direction giving by
  515.         info structure, because some archivers crunch multiple files in one
  516.         pass and the unarchiver needs to compress and buffer the whole
  517.         pass to get one file.
  518.  
  519.         When this function returns, the supplied output data streams may
  520.         be used in any way (files, memory). The library does not even know
  521.         that they exist! The xadmaster.library cannot be used to rename,
  522.         protect, comment or delete that stuff!
  523.  
  524.     INPUT
  525.         ai      - the master communication structure
  526.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  527.           XAD_ENTRYNUMBER, XAD_PASSWORD, output tags of
  528.           xadGetHookAccess()
  529.  
  530.     RESULT
  531.         result  - any of the XADERR codes or zero when all is ok.
  532.  
  533.     SEE ALSO
  534.         libraries/xadmaster.h, xadDiskUnArc(), xadGetInfo(),
  535.         xadGetHookAcess(), tags section
  536.  
  537. xadmaster.library/xadFreeInfo                   xadmaster.library/xadFreeInfo
  538.  
  539.     NAME
  540.         xadFreeInfo - free stuff built and allocated with xadGetInfo()
  541.  
  542.     SYNOPSIS
  543.         xadFreeInfo(ai)
  544.                     A0
  545.  
  546.         void xadFreeInfo(struct xadArchiveInfo *)
  547.  
  548.     FUNCTION
  549.         Frees all the stuff built and allocated by a call to xadGetInfo() or
  550.         xadGetDiskInfo(). You always need to call this after your work with
  551.         a certain input file is finished.
  552.  
  553.     INPUTS
  554.         ai      - the master communication structure
  555.  
  556.     SEE ALSO
  557.         libraries/xadmaster.h, xadGetInfo(), xadGetDiskInfo()
  558.  
  559. xadmaster.library/xadFreeHookAccess       xadmaster.library/xadFreeHookAccess
  560.  
  561.     NAME
  562.         xadFreeHookAccess - free stuff allocated with xadGetHooAccess() (V8)
  563.  
  564.     SYNOPSIS
  565.         xadFreeHookAccessA(ai, tags)
  566.                           A0   A1
  567.  
  568.         void xadHookAccessA(struct xadArchiveInfo *, struct TagItem *)
  569.  
  570.         xadFreeHookAccess(ai, tag1, ...)
  571.  
  572.         void xadFreeHookAccess(struct xadArchiveInfo *, Tag, ...)
  573.  
  574.     FUNCTION
  575.         Frees all the stuff built and allocated by a call to xadGetHookAccess().
  576.         You always need to call this after your work with the hooks is finished.
  577.  
  578.     INPUTS
  579.         ai      - the master communication structure
  580.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  581.                   XAD_WASERROR
  582.  
  583.     SEE ALSO
  584.         libraries/xadmaster.h, xadGetHookAccess()
  585.  
  586. xadmaster.library/xadFreeObject               xadmaster.library/xadFreeObject
  587.  
  588.     NAME
  589.         xadFreeObject - Frees structures allocated with xadAllocObject() or
  590.                         xadAllocVec()
  591.  
  592.     SYNOPSIS
  593.         xadFreeObjectA(object, tags)
  594.                          A0      A1
  595.  
  596.         void xadFreeObjectA(APTR, struct TagItem *)
  597.  
  598.         xadFreeObject(object, tag1, ...)
  599.  
  600.         void xadFreeObject(APTR, Tag, ...)
  601.  
  602.     FUNCTION
  603.         Frees object allocated by xadAllocObject() or xadAllocVec(). Do not call
  604.         for objects allocated in any other way.
  605.         This function frees ALL memory which was allocated by xadAllocObject(),
  606.         but only this memory. This means all name buffers and other related
  607.         structures are freed, but if you replace pointers, your replacements
  608.         get not freed. This function does not need the original pointers to be
  609.         in the related positions, as the buffer size is stored elsewhere.
  610.  
  611.     INPUTS
  612.         object  - object allocated with xadAllocObject() or xadAllocVec()
  613.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  614.                   currently none
  615.  
  616.     SEE ALSO
  617.         libraries/xadmaster.h, xadAllocObject(), xadAllocVec(), tags section
  618.  
  619. xadmaster.library/xadGetClientInfo         xadmaster.library/xadGetClientInfo
  620.  
  621.     NAME
  622.         xadGetClientInfo - Get list of active clients
  623.  
  624.     SYNOPSIS
  625.         ptr = xadGetClientInfo()
  626.         D0
  627.  
  628.         struct xadClient *xadGetClientInfo(void)
  629.  
  630.     FUNCTION
  631.         This function returns a list of all active clients. It can be used
  632.         to show information about the library. The list is read only and
  633.         cannot be modified!
  634.  
  635.     RESULT
  636.         ptr     - Pointer to first client in the list.
  637.  
  638.     SEE ALSO
  639.         libraries/xadmaster.h
  640.  
  641. xadmaster.library/xadGetDiskInfo             xadmaster.library/xadGetDiskInfo
  642.  
  643.     NAME
  644.         xadGetDiskInfo - get information about files from disk image (V4)
  645.  
  646.     SYNOPSIS
  647.         result = xadGetDiskInfoA(ai, tags)
  648.         D0                       A0   A1
  649.  
  650.         LONG xadGetDiskInfoA(struct xadArchiveInfo *, struct TagItem *)
  651.  
  652.         result = xadGetDiskInfo(ai, tag1, ...)
  653.  
  654.         LONG xadGetDiskInfo(struct xadArchiveInfo *, Tag, ...)
  655.  
  656.     FUNCTION
  657.         This function returns all useful information about a specified
  658.         disk image filesytem structure. The information about files,
  659.         directories and links are stored in xai_FileInfo list. You may
  660.         call xadDiskFileUnArc() to extract files from the disk image.
  661.  
  662.         The data must be freed by a call to xadFreeInfo(). After that the
  663.         xadArchiveInfo structure must be freed and NEVER be used again!
  664.  
  665.         The supplied input stream is used and must be valid and unmodified
  666.         until xadFreeInfo() is called. Only the master functions are allowed
  667.         to access the stream, but it is guaranteed to be unmodified!
  668.  
  669.     INPUT
  670.         ai      - the master communication structure
  671.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  672.           XAD_STARTCLIENT, XAD_NOEMPTYERROR, XAD_PASSWORD,
  673.           XAD_NOEXTERN, input tags of xadGetHookAccess()
  674.  
  675.     RESULT
  676.         result  - any of the XADERR codes or zero when all is ok.
  677.  
  678.     SEE ALSO
  679.         libraries/xadmaster.h, xadFreeInfo(), xadDiskFileUnArc(),
  680.         xadGetInfo(), xadGetHookAccess(), tags section
  681.  
  682. xadmaster.library/xadGetErrorText           xadmaster.library/xadGetErrorText
  683.  
  684.     NAME
  685.         xadGetErrorText - Get error string from an error number
  686.  
  687.     SYNOPSIS
  688.         ptr = xadGetErrorText(errnum)
  689.         D0                    D0
  690.  
  691.         STRPTR xadGetErrorText(ULONG)
  692.  
  693.     FUNCTION
  694.         This function returns the error string related to the supplied
  695.         error number. This string is valid as long as xadmaster.library
  696.         is opened, so when needed any longer time it must be copied.
  697.  
  698.     INPUT
  699.         errnum  - in libraries/xadmaster.h defined XADERR_... numbers.
  700.  
  701.     RESULT
  702.         ptr     - Pointer to required string.
  703.  
  704.     SEE ALSO
  705.         libraries/xadmaster.h
  706.  
  707. xadmaster.library/xadGetInfo                     xadmaster.library/xadGetInfo
  708.  
  709.     NAME
  710.         xadGetInfo - get information about an archive
  711.  
  712.     SYNOPSIS
  713.         result = xadGetInfoA(ai, tags)
  714.         D0                   A0   A1
  715.  
  716.         LONG xadGetInfoA(struct xadArchiveInfo *, struct TagItem *)
  717.  
  718.         result = xadGetInfo(ai, tag1, ...)
  719.  
  720.         LONG xadGetInfo(struct xadArchiveInfo *, Tag, ...)
  721.  
  722.     FUNCTION
  723.         This function returns all useful information about a specified
  724.         archive. It opens the archive for working. You may call
  725.         xadFileUnArc() or xadDiskUnArc() for the included entries
  726.         after a successful call to xadGetInfo(). The data must be freed
  727.         by a call to xadFreeInfo(). After that the xadArchiveInfo structure
  728.         must be freed and NEVER be used again! For archives encrypting
  729.         the information parts as well, you need to specify XAD_PASSWORD.
  730.         This password can be used for all calls to a unarchiving function,
  731.         but is overwritten by XAD_PASSWORD tag argument (only for the
  732.         entry with XAD_PASSWORD specified). Check and parse the elements
  733.         xai_FileInfo and xai_DiskInfo. You may expect both lists to have
  734.         valid entries or also both to be empty. Parsing the lists is the
  735.         normal way to do anything.
  736.  
  737.         The supplied input stream is used and must be valid and unmodified
  738.         until xadFreeInfo() is called. Only the current client is allowed to
  739.         access the stream, but it is guaranteed to be unmodified!
  740.  
  741.     INPUT
  742.         ai      - the master communication structure
  743.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  744.           XAD_PASSWORD, XAD_NOEXTERN, input tags of
  745.           xadGetHookAccess()
  746.  
  747.     RESULT
  748.         result  - any of the XADERR codes or zero when all is ok.
  749.  
  750.     SEE ALSO
  751.         libraries/xadmaster.h, xadFreeInfo(), xadDiskUnArc(),
  752.         xadFileUnArc(), xadGetHookAccess(), tags section
  753.  
  754. xadmaster.library/xadGetHookAccess         xadmaster.library/xadGetHookAccess
  755.  
  756.     NAME
  757.         xadGetHookAccess - initialize input and output hooks
  758.  
  759.     SYNOPSIS
  760.         result = xadGetHookAccessA(ai, tags)
  761.         D0                         A0   A1
  762.  
  763.         LONG xadGetHookAccessA(struct xadArchiveInfo *, struct TagItem *)
  764.  
  765.         result = xadGetHookAccess(ai, tag1, ...)
  766.  
  767.         LONG xadGetHookAccess(struct xadArchiveInfo *, Tag, ...)
  768.  
  769.     FUNCTION
  770.         This function opens input and output hooks. The data must be freed
  771.         by a call to xadFreeHookAccess(). After that the xadArchiveInfo
  772.         structure must be freed and NEVER be used again!
  773.  
  774.         The supplied input and output streams are used and must be valid
  775.         and unmodified until xadFreeHookAccess() is called. Only the
  776.         current client is allowed to access the stream, but it is
  777.         guaranteed to be unmodified!
  778.  
  779.     You may use xadHookAccess() and xadHookTagAccess() to access the
  780.     streams.
  781.  
  782.     INPUT
  783.         ai      - the master communication structure
  784.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  785.                   XAD_INSIZE, XAD_INFILENAME, XAD_INFILEHANDLE,
  786.                   XAD_INMEMORY, XAD_INHOOK, XAD_INSPLITTED, 
  787.                   XAD_INXADSTREAM, XAD_INDISKARCHIVE,
  788.           XAD_OUTFILEHANDLE, XAD_OUTFILENAME, XAD_OUTHOOK,
  789.           XAD_OUTMEMORY, XAD_OUTSIZE, XAD_OUTXADSTREAM,
  790.           XAD_OUTDEVICE,
  791.           XAD_PROGRESSHOOK, XAD_VERIFY, XAD_FORMAT,
  792.           XAD_OVERWRITE, XAD_MAKEDIRECTORY, XAD_NOKILLPARTIAL,
  793.           XAD_IGNOREGEOMETRY
  794.  
  795.     RESULT
  796.         result  - any of the XADERR codes or zero when all is ok.
  797.  
  798.     SEE ALSO
  799.         libraries/xadmaster.h, xadFreeHookAccess(), xadHookAccess(),
  800.         xadHookTagAccess(), tags section
  801.  
  802. xadmaster.library/xadHookAccess               xadmaster.library/xadHookAccess
  803.  
  804.     NAME
  805.         xadHookAccess - a client only function to get/store data
  806.  
  807.     SYNOPSIS
  808.         result = xadHookAccess(command, data, buffer, ai)
  809.         D0                       D0      D1     A0    A1
  810.  
  811.         LONG xadHookAccess(ULONG, LONG, APTR, struct xadArchiveInfo *)
  812.  
  813.     FUNCTION
  814.         This function is for external clients only. It is needed to get
  815.         data, store results and seek in input or output. There are 5
  816.         commands XADAC_READ, XADAC_WRITE, XADAC_COPY, XADAC_INPUTSEEK,
  817.         XADAC_OUTPUTSEEK to do that. This function updates the xai_InPos,
  818.         xai_OutPos and xai_OutSize fields in xadArchiveInfo structure. The
  819.         seek commands and the copy command should set buffer parameter to
  820.         zero. Seek's and reads should not exceed the file borders! The
  821.         client knows position and size, so checks are possible before doing
  822.         wrong commands.
  823.  
  824.         See also xadHookTagAccess() function, which allows to pass tags for
  825.         deeper control, which is necessary sometimes.
  826.  
  827.     INPUT
  828.         command - one of the XADAC commands to control hook
  829.         data    - the required data, mostly a size value
  830.         buffer  - the input/output buffer for read and write
  831.         ai      - the master communication structure
  832.  
  833.     RESULT
  834.         result  - any of the XADERR codes or zero when all is ok.
  835.  
  836.     SEE ALSO
  837.         libraries/xadmaster.h, xadHookTagAccess()
  838.  
  839. xadmaster.library/xadHookTagAccess         xadmaster.library/xadHookTagAccess
  840.  
  841.     NAME
  842.         xadHookTagAccess - a client only function to get/store data (V3)
  843.  
  844.     SYNOPSIS
  845.         result = xadHookTagAccessA(command, data, buffer, ai, tags)
  846.         D0                           D0      D1     A0    A1   A2
  847.  
  848.         LONG xadHookTagAccessA(ULONG, LONG, APTR, struct xadArchiveInfo *,
  849.              struct TagItem *)
  850.  
  851.         result = xadHookTagAccess(command, data, buffer, ai, tag1, ...)
  852.  
  853.         LONG xadHookTagAccess(ULONG, LONG, APTR, struct xadArchiveInfo *,
  854.              Tag, ...)
  855.  
  856.     FUNCTION
  857.         This function equals xadHookAccess() but allows to use tags to get
  858.         better control. This includes CRC creation and use of xadSkipInfo
  859.         system.
  860.  
  861.     INPUT
  862.         command - one of the XADAC commands to control hook
  863.         data    - the required data, mostly a size value
  864.         buffer  - the input/output buffer for read and write
  865.         ai      - the master communication structure
  866.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  867.                   XAD_CRC16ID, XAD_CRC32ID, XAD_GETCRC16, XAD_GETCRC32,
  868.                   XAD_USESKIPINFO
  869.  
  870.     RESULT
  871.         result  - any of the XADERR codes or zero when all is ok.
  872.  
  873.     SEE ALSO
  874.         libraries/xadmaster.h, xadHookAccess(), tags section
  875.  
  876. xadmaster.library/xadRecogFile                 xadmaster.library/xadRecogFile
  877.  
  878.     NAME
  879.         xadRecogFile - check if a file is an archive file or not
  880.  
  881.     SYNOPSIS
  882.         client = xadRecogFileA(size, memory, tags)
  883.         D0                     D0     A0     A1
  884.  
  885.         struct xadClient *xadRecogFileA(ULONG, APTR, struct TagItem *)
  886.  
  887.         client = xadRecogFile(size, memory, tag1, ...)
  888.  
  889.         struct xadClient *xadRecogFile(ULONG, APTR, Tag, ...)
  890.  
  891.     FUNCTION
  892.         This function can be used to check if a file is a archive or not.
  893.         It has only limited abilities! You need to pass a pointer to
  894.         memory of recogsize. The recogsize value can be found in
  895.         xadMasterBase. If the file is shorter, use the complete file as
  896.         buffer. Longer buffers are allowed as well. When the file is
  897.         archived, you get back a pointer to the client which detected the
  898.         file. If not, the return is zero. The only usable information
  899.         should be the name of the client. To get more information and all
  900.         archive related data you have to use xadGetInfo(), which calls
  901.         xadRecogFile internal itself.
  902.  
  903.         Normally this function is not needed by application programs. It
  904.         is used in xadList utility. This function is useful for tools
  905.         only detecting and displaying the archiver type.
  906.  
  907.     INPUT
  908.         size    - size of the memory region
  909.         memory  - pointer to the memory holding the file
  910.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  911.                   XAD_NOEXTERN
  912.  
  913.     RESULT
  914.         client  - pointer to client structure or zero when no archive
  915.  
  916.     SEE ALSO
  917.         libraries/xadmaster.h, xadGetInfo(), tags section
  918.  
  919. xadmaster.library/--tags--                         xadmaster.library/--tags--
  920.  
  921.     TAGS FOR xadAllocObject()
  922.  
  923.       XAD_OBJBLOCKENTRIES       (ULONG)
  924.         Can be specified together with XADOBJ_DISKINFO. This allocates
  925.         memory for xdi_BlockInfo. Data field of tag item contains number
  926.         of required blocks. Memory gets freed automatically, when object
  927.         is freed.
  928.  
  929.       XAD_OBJCOMMENTSIZE        (ULONG)
  930.         Like XAD_OBJNAMESIZE, but allocates memory for xfi_Comment entry.
  931.  
  932.       XAD_OBJNAMESIZE           (ULONG)
  933.         Can be specified together with XADOBJ_FILEINFO. This allocates
  934.         memory for storing file name. The required size has to be stored
  935.         in data field of tag item. The allocated memory pointer is stored
  936.         in xfi_FileName field of returned structure. Memory gets freed
  937.         automatically, when object is freed.
  938.  
  939.       XAD_OBJPRIVINFOSIZE       (ULONG)
  940.         Can be specified together with XADOBJ_FILEINFO and XADOBJ_DISKINFO.
  941.         This allocates longword aligned client private buffer, which is
  942.         stored in xfi_PrivateInfo or xdi_PrivateInfo field. The required
  943.         size has to be stored in data field of tag item. Memory gets freed
  944.         automatically, when object is freed.
  945.  
  946.     INPUT TAGS FOR xadGetHookAccess()
  947.  
  948.       XAD_INDISKARCHIVE        (struct TagItem *) (V4)
  949.     This hook allows to supply a disk archive as input source for
  950.     file extraction from disk image files. You need to pass a
  951.     pointer to a tagitem list (finished with TAG_DONE!) as data.
  952.     This list is passed to xadGetInfo(). It may contain any of the
  953.     tags supported by that function and must contain any of the
  954.     input hook tags! Additionally it may contain XAD_ENTRYNUMBER
  955.     to specify the entry, which should be used! If not, the first
  956.     entry is used!
  957.  
  958.       XAD_INFILEHANDLE          (BPTR)
  959.         FileHandle to get data from. It is not necessary that the handle
  960.         is at the beginning of the file.
  961.  
  962.       XAD_INFILENAME            (STRPTR)
  963.         Name of the input file.
  964.  
  965.       XAD_INHOOK                (struct Hook *)
  966.         This enables any other way of data delivering. See special
  967.         chapter on I/O hook functions.
  968.  
  969.       XAD_INMEMORY              (STRPTR)
  970.         Pointer to a memory buffer holding the input data. You need to
  971.         specify XAD_INSIZE when using this.
  972.  
  973.       XAD_INSIZE                (ULONG)
  974.         Specify the size of input data. Must be used together with
  975.         XAD_INMEMORY. Can be used together with other hooks.
  976.  
  977.       XAD_INSPLITTED            (struct xadSplitFile *) (V2)
  978.         For multivolume archives it is necessary to supply multiple files.
  979.         This tag allows to pass multiple input streams of any type in a
  980.         linked list of xadSplitFile structures. The clients see that as
  981.         one single continous stream (except that ai->xai_MultiVolume
  982.         contains a field with size information for every part).
  983.         Each entry must contain one of the other input types and the
  984.         corresponding data. Also the size can be or must be (XAD_INMEMORY)
  985.         passed in xadSplitFile structure.
  986.         Clients could expect the parts in it correct order, but should be
  987.         able to handle missing or corrupted part.
  988.  
  989.       XAD_INXADSTREAM        (struct TagItem *) (V8)
  990.     This allows to use an already existing XAD data stream as input for
  991.     new calls. Can be used from clients to work with embedded archives
  992.     in other archives. Do not touch the data yourself with
  993.     xadHookAccess() until you released the secondary use with 
  994.     xadFreeInfo()! At least XAD_ARCHIVEINFO must be supplied. Other tags
  995.     of xadHookTagAccess() are supported as well. CRC-Pointers must be
  996.     valid until xadFreeInfo()!
  997.  
  998.     OUTPUT TAGS FOR xadGetHookAccess()
  999.  
  1000.       XAD_IGNOREGEOMETRY        (BOOL)
  1001.         This forces the device hook to use devices with different drive
  1002.         geometry than the one on disk archive. Most time this will produce
  1003.         useless disks. If not set the progress hook may get asked if
  1004.         geometry should be ignored or not (if there is one).
  1005.  
  1006.       XAD_FORMAT                (BOOL) (V5)
  1007.         Turns on formating of output device. This is turned off by default.
  1008.  
  1009.       XAD_MAKEDIRECTORY         (BOOL)
  1010.         Create missing directory tree when necessary. If not set the
  1011.         progress hook may get asked if directory should be created or
  1012.         not (if there is one).
  1013.  
  1014.       XAD_NOKILLPARTIAL        (BOOL) (V3.3)
  1015.     If this is set to true, partial or corrupted files get not deleted.
  1016.     This has effect only for file output hook and only if the filename
  1017.     was passed (and not the FileHandle pointer).
  1018.  
  1019.       XAD_OUTDEVICE             (struct xadDeviceInfo *)
  1020.         For disk archives it is useful to store data directly on a disk.
  1021.         Use this tag to specify the device where data should be stored.
  1022.         In xdi_DOSName the DOS device must be stored, which must not be
  1023.         terminated with a ':' character.
  1024.         Alternatively in fields xdi_DeviceName and xdi_Unit the wanted
  1025.         device must be specified. The device must support TD_GETGEOMETRY
  1026.         command, even if XAD_IGNOREGEOMETRY is turned on, as the hook
  1027.         needs at least the blocksize for internal buffering.
  1028.         NOTE: When xdi_DeviceName and xdi_Unit is used, the hook cannot
  1029.         perform an Inhibit operation and thus it cannot prevent other
  1030.         tasks from accessing the device. Also a DOS device is not updated,
  1031.         so a DiskChange becomes necessary.
  1032.         I suggest always using xdi_DOSName field!
  1033.       
  1034.       XAD_OUTFILEHANDLE         (BPTR)
  1035.         FileHandle to send data to. It is not necessary that the handle
  1036.         is at the beginning of the file.
  1037.  
  1038.       XAD_OUTFILENAME           (STRPTR)
  1039.         Name of the output file.
  1040.  
  1041.       XAD_OUTHOOK               (struct Hook *)
  1042.         This enables any other way of data storing. See special chapter
  1043.         on I/O hook functions.
  1044.  
  1045.       XAD_OUTMEMORY             (STRPTR)
  1046.         Pointer to a memory buffer to store data in. You need to specify
  1047.         XAD_OUTSIZE when using this.
  1048.  
  1049.       XAD_OUTSIZE               (ULONG)
  1050.         Specify the maximum size of output data. Must be used together with
  1051.         XAD_OUTMEMORY.
  1052.  
  1053.       XAD_OUTXADSTREAM        (struct TagItem *) (V8)
  1054.     This allows to use an already existing XAD data stream as output for
  1055.     new calls. Can be used from clients to work with embedded archives
  1056.     in other archives. Do not touch the data yourself with
  1057.     xadHookAccess() until you released the secondary use with 
  1058.     xadFreeInfo()! At least XAD_ARCHIVEINFO must be supplied. Other tags
  1059.     of xadHookTagAccess() are supported as well. 
  1060.  
  1061.       XAD_OVERWRITE             (BOOL)
  1062.         This forces the file hook to overwrite existing destination files.
  1063.         If not set the progress hook may get asked if files should be
  1064.         overwritten or not (if there is one).
  1065.  
  1066.       XAD_PROGRESSHOOK          (struct Hook *)
  1067.         The progress hook for status displays. See special progress hook
  1068.         chapter for more information.
  1069.  
  1070.       XAD_VERIFY                (BOOL)
  1071.         Turns on verify for device output. This is turned off by default.
  1072.  
  1073.     TAGS FOR xadConvertDates()
  1074.  
  1075.       XAD_DATEUNIX              (ULONG)
  1076.         Input is an UNIX date value (seconds starting with 01.01.1970).
  1077.  
  1078.       XAD_DATEAMIGA             (ULONG)
  1079.         Input as an Amiga date value (seconds starting with 01.01.1978).
  1080.  
  1081.       XAD_DATEDATESTAMP         (struct DateStamp *)
  1082.         Input is a pointer to an Amiga DateStamp structure.
  1083.  
  1084.       XAD_DATEXADDATE           (struct xadDate *)
  1085.         Input is a pointer to a xadmaster date structure.
  1086.  
  1087.       XAD_DATECLOCKDATA         (struct ClockData *)
  1088.         Input is a pointer to a ClockData structure.
  1089.  
  1090.       XAD_DATECURRENTTIME       (void)
  1091.         Current system time value should be used as input.
  1092.  
  1093.       XAD_DATEMAC               (ULONG) (V8)
  1094.         Input as an MacIntosh date value (seconds starting with 01.01.1904).
  1095.  
  1096.       XAD_DATEMSDOS             (ULONG) (V2)
  1097.         Input is an 32 bit packed date format used by MS-DOS. This means:
  1098.         Bit 0..4 is half second (25 = second 49 or 50), 5..10 is minute,
  1099.         11..15 is hour, 16..20 is day, 21..24 is month (1 = january) and
  1100.         25..31 is year (0 = year 1980). This format is used for archivers
  1101.         like RAR or Zip.
  1102.  
  1103.       XAD_GETDATEUNIX           (ULONG *)
  1104.         An UNIX time value should be stored in the ULONG variable, the
  1105.         supplied pointer points to.
  1106.  
  1107.       XAD_GETDATEAMIGA          (ULONG *)
  1108.         An Amiga time value should be stored in the ULONG variable, the
  1109.         supplied pointer points to.
  1110.  
  1111.       XAD_GETDATEDATESTAMP      (struct DateStamp *)
  1112.         The date should be stored in DateStamp structure the supplied
  1113.         pointer points to.
  1114.  
  1115.       XAD_GETDATEXADDATE        (struct xadDate *)
  1116.         The date should be stored in xadmaster date structure the supplied
  1117.         pointer points to.
  1118.  
  1119.       XAD_GETDATECLOCKDATA      (struct ClockData *)
  1120.         The date should be stored in ClockData structure the supplied
  1121.         pointer points to.
  1122.  
  1123.       XAD_GETDATEMAC            (ULONG *) (V8)
  1124.         An MacIntosh time value should be stored in the ULONG variable, the
  1125.         supplied pointer points to.
  1126.  
  1127.       XAD_GETDATEMSDOS          (ULONG *) (V2)
  1128.         An MS-DOS packed date value should be stored in the ULONG variable,
  1129.         the supplied pointer points to.
  1130.  
  1131.       XAD_MAKEGMTDATE           (BOOL)
  1132.         This forces the function to subtract the GMT offset supplied by
  1133.         locale.library to convert a local date to GMT date. Opening
  1134.         locale.library is required for that. When it cannot be openend or
  1135.         the offset would cause a overrun or underrun in the xd_Year field,
  1136.         no offset will be used. 
  1137.       
  1138.       XAD_MAKELOCALDATE         (BOOL)
  1139.         This forces the function to add the GMT offset supplied by
  1140.         locale.library to convert a GMT date to a local date. Opening
  1141.         locale.library is required for that. When it cannot be openend or
  1142.         the offset would cause a overrun or underrun in the xd_Year field,
  1143.         no offset will be used.
  1144.  
  1145.     TAGS FOR xadHookTagAccess() (V3)
  1146.  
  1147.       XAD_CRC16ID               (UWORD)
  1148.         This tag specifies the CRC-ID, which should be used for CRC16
  1149.         calculation. The default value is XADCRC16_ID1.
  1150.  
  1151.       XAD_CRC32ID               (ULONG)
  1152.         This tag specifies the CRC-ID, which should be used for CRC32
  1153.         calculation. The default value is XADCRC32_ID1.
  1154.  
  1155.       XAD_GETCRC16              (UWORD *)
  1156.         A pointer to a UWORD variable holding the CRC start value and after
  1157.         calling xadHookTagAccess() the final CRC value. CRC checks are done
  1158.         for XADAC_COPY, XADAC_READ and XADAC_WRITE.
  1159.  
  1160.       XAD_GETCRC32              (ULONG *)
  1161.         Like XAD_GETCRC16, but for 32 bit checksums.
  1162.  
  1163.       XAD_USESKIPINFO           (BOOL)
  1164.         The field xadSkipInfo of xadArchiveInfo structure is used to skip
  1165.         parts of the input stream for read, copy and input seek operations.
  1166.         Whenever this tag is used, then the contents of the xai_SkipInfo
  1167.         field is interpreted.
  1168.         The data parts specified in the list are skipped for read and seek
  1169.         operations, so that you get always continous data blocks. It does
  1170.         not ignore them totally, so file sizes and file position are not
  1171.         changed. So if you read 500 bytes and there is a 8 byte skip block
  1172.         in between, then file position increases by 508 byte, but you get
  1173.         500 byte data without the skipped data.
  1174.  
  1175.         xadSkipInfo information only affects operations in input stream!
  1176.  
  1177.         The entries of xadSkipInfo list must not overlap and there must be
  1178.         at least one byte between entries!
  1179.  
  1180.     TAGS FOR xadConvertProtection() (V4)
  1181.  
  1182.       XAD_GETPROTAMIGA        (ULONG *)
  1183.     This tag is used to get the computed protection bits in Amiga format
  1184.     including the multiuser bits. These can be store in xadFileInfo
  1185.     structure.
  1186.  
  1187.       XAD_PROTAMIGA        (ULONG)
  1188.     Input bits of Amiga style. This tag is useful together with other
  1189.     tags only. Archives containing Amiga protection without multiuser
  1190.     bits and Unix bits may be converted this way: "XAD_PROTAMIGA,
  1191.     amigabits, XAD_PROTUNIX, unixbits, XAD_GETPROTAMIGA, &amigabits".
  1192.     Now the multiuser bits are inluded.
  1193.     Specifying this tag always resets calculation! It may be used to
  1194.     reset the default bits as well. Specifying and XAD_PROTxxx tags
  1195.     in front of this one is really useless.
  1196.  
  1197.       XAD_PROTMSDOS        (ULONG)
  1198.     Input bits of MSDOS style: 0 = read only, 1 = hidden, 2 = system,
  1199.     3 = volumename, 4 = directory, 5 = archived
  1200.     Only "r,w,a,d" bits of Amiga style are affected.
  1201.  
  1202.       XAD_PROTUNIX        (ULONG)
  1203.     Input bits of UNIX style: 0 = other execute, 1 = other write,
  1204.     2 = other read, 3 = group execute, 4 = group write, 5 = group read,
  1205.     6 = execute, 7 = write, 8 = read
  1206.     This affects the "r,w,e" and the multiuser bits of Amiga style.
  1207.  
  1208.     TAGS FOR different functions
  1209.  
  1210.       XAD_ARCHIVEINFO        (struct xadArchiveInfo *) (V8)
  1211.     This must be used to supply archive info with XAD_OUTXADSTREAM and
  1212.     XAD_INXADSTREAM.
  1213.  
  1214.       XAD_ENTRYNUMBER           (ULONG)
  1215.         This flag specifies the wanted entry. You must not specify more
  1216.         or less than one of that flag for every call to xadFileUnArc(),
  1217.         xadDiskFileUnArc() or xadDiskUnArc(). Normally this flag equals
  1218.         the element xdi_EntryNumber for currently parsed xadDiskInfo
  1219.         structure and xfi_EntryNumber for currently parsed xadFileInfo
  1220.         structure.
  1221.  
  1222.       XAD_HIGHCYLINDER          (ULONG)
  1223.         It specifies the highest cylinder which should be unarchived for
  1224.         xadDiskUnArc().
  1225.  
  1226.       XAD_LOWCYLINDER           (ULONG)
  1227.         It specifies the lowest cylinder which should be unarchived for
  1228.         xadDiskUnArc().
  1229.  
  1230.       XAD_NOEMPTYERROR        (BOOL) (V8)
  1231.     This one prevents production of XADERR_EMPTY, but instead
  1232.     xadGetDiskInfo() returns the empty file list. This is very useful
  1233.     together with XAD_STARTCLIENT tag.
  1234.  
  1235.       XAD_NOEXTERN              (BOOL)
  1236.         When this is specified for xadGetInfo(), xadGetDiskInfo() or
  1237.         xadRecogFile(), the library skips any external clients. Normally
  1238.         this should not be necessary. Some of the main clients are
  1239.         external as well (for legal reasons).
  1240.  
  1241.       XAD_PASSWORD              (STRPTR)
  1242.         You may supply a password for xadGetInfo(), xadFileUnArc() and
  1243.         xadDiskUnArc() functions.
  1244.  
  1245.       XAD_STARTCLIENT        (struct xadClient *) (V7)
  1246.     As there may be multiple filesystems on one disk image file (e.g.
  1247.     standard AmigaOS filesystem hiding an other one), it is useful to
  1248.     rescan the file. If you call xadGetDiskInfo() with this tagitem
  1249.     set to the client which comes after the one found in previous run
  1250.     (ai->xai_Client->xc_Next), you may detect such double systems also.
  1251.     May be passed to xadGetDiskInfo().
  1252.  
  1253.       XAD_WASERROR        (LONG) (V8)
  1254.     Allows to supply an error number to xadFreeHookAccess(), which
  1255.     occured by accessing hooks. Supplying this results an calling the
  1256.     abort method of hooks.
  1257.  
  1258. xadmaster.library/-- data hooks--            xadmaster.library/--data hooks--
  1259.  
  1260.     GENERAL
  1261.         You have four methods of passing data to xadmaster.library: file-
  1262.         names, filehandles, memory areas and hooks. The hooks are described
  1263.         here. The hook field h_Entry has to be standard hook functions and
  1264.         gets called with the hook itself in A0 and a pointer to a
  1265.         xadHookParam in A1. Commands are stored in xhp_Command field, data
  1266.         in the other fields. Return values are 0 or any of the XADERR codes.
  1267.         Unsupported commands are returned with XADERR_NOTSUPPORTED.
  1268.  
  1269.         You may store a pointer to private data in the field xhp_PrivatePtr.
  1270.         You always get a XADHC_FREE after work to enable you freeing your
  1271.         resources.
  1272.  
  1273.         Whenever an error occured, the hook gets called with XADHC_ABORT.
  1274.         Use this to delete partial file, free useless memory or whatever
  1275.         you used. You must not do cleanup stuff on XADHC_ABORT call, as 
  1276.         XADHC_FREE call follows after it.
  1277.         
  1278.         NOTE: Because hooks are not called in program environment, they
  1279.         cannot be used in small data model of some compilers, as register
  1280.         A4 is not passed through. So the hook either has to be compiled in
  1281.         large data model or should use __saveds keyword of some compilers.
  1282.  
  1283.     COMMANDS
  1284.       XADHC_READ                (input hooks only)
  1285.         This command is called all time xadmaster.library needs some data.
  1286.         Fill the supplied memory area with input data of needed size.
  1287.         Input:  xhp_BufferSize  size of required data
  1288.                 xhp_BufferPtr   buffer to fill
  1289.         Output: xhp_DataPos     buffer position after read
  1290.  
  1291.       XADHC_WRITE               (output hooks only)
  1292.         This function is called, if some data should be stored. Copy
  1293.         the contents of buffer to your data storing system.
  1294.         Input:  xhp_BufferSize  size of data
  1295.                 xhp_BufferPtr   pointer to memory area
  1296.         Output: xhp_DataPos     buffer position after write
  1297.  
  1298.       XADHC_SEEK                (both)
  1299.         Change the current position in your data (like dos.library Seek
  1300.         command). The offset you have to seek is always relative to
  1301.         current position. It can be negative too. Seek's with size 0 can
  1302.         be used to get current file position.
  1303.         Input:  xhp_CommandData offset you have to seek
  1304.         Output: xhp_DataPos     buffer position after seek
  1305.  
  1306.       XADHC_INIT                (both)
  1307.         The work starts. Allocate needed structures and initialize your
  1308.         stuff. Clear xhp_BufferPos.
  1309.         Input:  none
  1310.         Output: none
  1311.  
  1312.       XADHC_FREE                (both)
  1313.         You get this when work is finished, free all your stuff now. You
  1314.         need to clear all pointers you use for checking, as it may happen
  1315.         that you get multiple XADHC_FREE commands.
  1316.         Input:  none
  1317.         Output: none
  1318.  
  1319.       XADHC_ABORT               (output hooks only)
  1320.         You get this when work was aborted, because an error occured.
  1321.         Free all work stuff. Buffers must be freed by later XADHC_FREE call.
  1322.         Be prepared to get multiple XADHC_ABORT commands.
  1323.         Input:  none
  1324.         Output: none
  1325.  
  1326.       XADHC_FULLSIZE            (input hooks only)
  1327.         The hook should return complete size of input data which should be
  1328.         processed.
  1329.         Input:  none
  1330.         Output: xhp_CommandData size of input file
  1331.  
  1332.       XADHC_IMAGEINFO        (input hooks only) (V4)
  1333.     The hook should return information about disk image file. Normally
  1334.     hooks return XADERR_NOTSUPPORTED for this, like for all unsupported
  1335.     commands. Only the internal disk archive hook is able to return
  1336.     useful data.
  1337.     Input:    xhp_CommandData contains pointer to xadImageInfo structure,
  1338.         which should be filled
  1339.     Output: xadImageInfo structure in xhp_CommandData is filled with data
  1340.  
  1341. xadmaster.library/-- progress hooks--    xadmaster.library/--progress hooks--
  1342.  
  1343.     GENERAL
  1344.         This hook can be used to do display completion reports or ask the
  1345.         user. It gets a pointer to a xadProgressInfo structure. The hook
  1346.         returns a combination of XADPIF flags. A return value without
  1347.         XADPIF_OK (mostly 0) means a break command. Normally a hook should
  1348.         check for <CTRL>-<C> presses (or any other break condition) and add a
  1349.         XADPIF_OK to return value when no break condition exists.
  1350.  
  1351.         A progress hook must not support all possibilities! For example hooks
  1352.         from file unarchiving utilities never need an XADPIF_IGNOREGEOMETRY
  1353.         check. Also they need not support renaming or any other stuff. But
  1354.         the more they support, the better the user can work with the tool!
  1355.  
  1356.     MODES
  1357.       XADPMODE_ASK
  1358.         The master library has some problems, which need user interaction.
  1359.         The implementation of the user interaction depends on the
  1360.         application. The xpi_Status holds information what question needs to
  1361.         be answered. When XADPIF_OVERWRITE is set, the hook must determine if
  1362.         the file should be overwritten, renamed or not. The return flags
  1363.         must be set corresponding to this decision. Same is for
  1364.         XADPIF_IGNORGEGEOMETRY and XADPIF_MAKEDIRECTORY flag.
  1365.  
  1366.         XADPIF_IGNOREGEOEMTRY
  1367.           The hook either returns XADPIK_OK|XADPIF_IGNOREGEOMETRY or only
  1368.           XADPIF_OK, when user doesn't think geometry can be ignored.
  1369.  
  1370.         XADPIF_MAKEDIRECTORY
  1371.           The hook either returns XADPIK_OK|XADPIF_MAKEDIRECTORY or only
  1372.           XADPIF_OK, when user doesn't want to make directory.
  1373.  
  1374.         XADPIF_OVERWRITE
  1375.           The destination file already exists. The user should get 6 chances
  1376.           now (named with some standard letters).
  1377.           N - Do not do anything. The hook returns XADPIF_OK.
  1378.           Y - Turn overwrite on. The hook returns XADPIF_OK|XADPIF_OVERWRITE.
  1379.           A - Turn overwrite on for all files. The hook stores this
  1380.               information and returns XADPIF_OK|XADPIF_OVERWRITE. All
  1381.               following XADPIF_OVERWRITE requests are automatically answered
  1382.               with this return.
  1383.           S - Skip that file. The hook returns XADPIF_OK|XADPIF_SKIP.
  1384.           Q - Quit the program. The hook returns XADPIF_OK and the program
  1385.               quits before next call.
  1386.           R - The user wants to rename the file. The hook calls xadAllocVec()
  1387.               to get some memory for the name and passes this in xpi_NewName.
  1388.               This memory is freed by xadmaster.library afterwards!
  1389.               The return value is XADPIF_OK|XADPIF_RENAME.
  1390.  
  1391.       XADPMODE_END
  1392.         This is the last progress display with final results.
  1393.  
  1394.       XADPMODE_ERROR
  1395.         An error occured. The error value is in xpi_Error field.
  1396.  
  1397.       XADPMODE_PROGRESS
  1398.         Normal progress display. Depending on data type (disk/file), some
  1399.         progress information can be displayed.
  1400.  
  1401.     RETURN VALUES
  1402.       0 or anything without XADPIF_OK
  1403.         The work should be aborted. The master library returns XADERR_BREAK.
  1404.  
  1405.       XADPIF_OK
  1406.         No break condition occured. The normal return value for progress
  1407.         display. Also used when user choosed to answer NO to XADPMODE_ASK
  1408.         questions.
  1409.  
  1410.       XADPIF_OK|XADPIF_IGNOREGEOMETRY
  1411.         User choosed that drive geometry can be ignored.
  1412.  
  1413.       XADPIF_OK|XADPIF_MAKEDIRECTORY
  1414.         User choosed that directory should be created.
  1415.  
  1416.       XADPIK_OK|XADPIF_OVERWRITE
  1417.         User choosed that file should be overwritten.
  1418.  
  1419.       XADPIF_OK|XADPIF_RENAME
  1420.         User choosed that file should be renamed. The field xpi_NewName must
  1421.         contain a memory block allocated with xadAllocVec() which holds a new
  1422.         file name. This block is freed by xadmaster.library afterwards!
  1423.  
  1424.       XADPIF_OK|XADPIF_SKIP
  1425.         User choosed to skip that file. The master library returns XADERR_SKIP
  1426.         in that case.
  1427.  
  1428.